<?php
	$un = "root";
	$pass = "";
	$db = "cp3003";
	
	mysql_connect('localhost',$un,$pass);
	@mysql_select_db($db) or die( "Unable to select database");
	
	$title = $_REQUEST['title'];
	$content = $_REQUEST['content'];
	$date = date("Y-m-d H:i:s", strtotime('+8 hour'));
	
	$query = "INSERT INTO announcements (title, content, date)
		VALUES ('$title', '$content', '$date')";
	mysql_query($query);
	echo "Announcement submitted!";
?>